package com.becca.cake.dao.companyEatApply;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
import com.becca.cake.model.activity.CompanyEatApplyModel;

/**
 * 企业试吃Dao层
 * @copyright  尊星(上海)信息科技有限公司
 * @author yellow
 * @date 2016年7月20日 下午4:42:26
 */
@Repository
public interface CompanyEatApplyDAO {
    /**
     * 试吃申请查询
     * @param map
     * @return
     * @throws DataAccessException
     */
    List<CompanyEatApplyModel> selectCompanyEatApply(Map<String, Object> map)
                                                                             throws DataAccessException;

    /**
     * 获取试吃申请数据列表总条数
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long selectCompanyEatApplyCount(Map<String, Object> map) throws DataAccessException;

    /**
     * 查询试吃申请对象
     * @return
     * @throws DataAccessException
     */
    CompanyEatApplyModel selectCompanyEatApplyById(Integer id) throws DataAccessException;

    /**
     * 修改试吃申请信息
     * @param companyEatApplyModel
     * @throws DataAccessException
     */
    void updCompanyEatApplyById(CompanyEatApplyModel companyEatApplyModel)
                                                                          throws DataAccessException;

    /**
     * 更改通过状态
     * @param companyEatApplyModel
     * @throws DataAccessException
     */
    void updCompanyEatApplyStatusById(Map<String, Object> map) throws DataAccessException;

    /**
     * 不通过处理
     * @param map
     * @throws DataAccessException
     */
    void updNoPassApplyById(Map<String, Object> map) throws DataAccessException;

    /**
     * 判断企业试吃申请是否已经通过或未通过
     * @param map
     * @return
     * @throws DataAccessException
     */
    Long isExistPassedOrNot(Map<String, Object> map) throws DataAccessException;

    /**
     * 导出试吃申请数据
     * @param ids
     * @return
     * @throws DataAccessException
     */
    List<CompanyEatApplyModel> selectCompanyEatApplyToExcel(@Param("ids") String ids)
                                                                                     throws DataAccessException;

    /**
     * 企业试吃已联系
     * @param map
     * @throws DataAccessException
     */
    void updateEatApplyConnection(Map<String, Object> map) throws DataAccessException;
    /**
     * 企业试吃通过审核
     * @param map
     * @throws DataAccessException
     */
    void companyEatApplyReviewPass(Map<String, Object> map);

}
